package com.jxd.dianping.service;

import com.jxd.dianping.common.BusinessException;
import com.jxd.dianping.model.ShopModel;

import java.io.IOException;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface ShopService {
    ShopModel create(ShopModel shopModel) throws BusinessException;
    ShopModel get(Integer id) throws BusinessException;
    List<ShopModel> selectAll();
    Integer countAllShop();

    // 推荐
    List<ShopModel> recommend(BigDecimal longitude, BigDecimal latitude);
    // 搜索
    List<ShopModel> search(BigDecimal longitude, BigDecimal latitude, String keyword, Integer orderby, Integer categoryId, String tags);
    // 关键词搜索
    List<Map<String, Object>> searchGroupByTags(String keywords, Integer categoryId);

    Map<String, Object> searchES(BigDecimal longitude, BigDecimal latitude, String keyword, Integer orderby, Integer categoryId, String tags) throws IOException, BusinessException;

}
